 module.exports = function (UC, source, config, ArFor, cache, package) {
     var UserControl = UC;

     var UploadFiles = config.UploadFiles;

     var router = function (req, res, next) {
         var query = req.query;
         if (query.FileType) {
             UploadFiles(req, UC, config, function (value) {
                 var obj = {
                     error: 1
                 };
                 if (value.error == 0) {
                     obj.error = 0;
                     obj.links = []
                     for (var i = 0; i < value.List.length; i++) {
                         obj.id = value.List[i].id;
                         obj.link = '~/Service/Video/' + value.List[i].id + '/m3u8/';
                         obj.links.push(obj.link);
                     }
                 };
                 res.Json(obj);
             });
         } else {
             var value = {
                 error: 1
             };
             res.Json(value);
         }
     }
     return router;
 }